package cn.sirun.com.fca.account.view.impl;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.tencent.cloud.iov.common.flow.view.impl.BaseLoadingFlowView;
import com.tencent.cloud.iov.flow.presenter.IPresenter;
import com.tencent.cloud.iov.flow.view.IContentViewContainer;
import com.tencent.cloud.iov.router.Router;
import com.tencent.cloud.iov.util.ActivityUtils;
import com.tencent.cloud.uikit.utils.SystemUiUtils;
import com.tencent.cloud.uikit.widget.edittext.LineEditText;

import cn.sirun.com.fca.account.R;
import cn.sirun.com.fca.account.constant.AccountActivityConst;

public class CompanyAuthCarFlowView extends BaseLoadingFlowView {

    private LineEditText mOwnerET, mVinET;
    private ImageView mOwnerPromptIV, mVinIV;
    private TextView mOwnerTV, mVinTV, mNextTV;
    private View mOwnerLineV, mVinLineV;

    public CompanyAuthCarFlowView(Activity activity) {
        super(activity);
    }

    public CompanyAuthCarFlowView(Activity activity, IContentViewContainer container) {
        super(activity, container);
    }

    @Override
    protected IPresenter createPresenter() {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        setUpActionBar();
        initView();
    }

    private void setUpActionBar() {
        final Activity activity = getActivity();
        SystemUiUtils.showActionBar(activity, "");
    }

    private void initView() {
        setContentView(R.layout.company_auth_car_activity);
        final Activity activity = getActivity();
        mOwnerET = activity.findViewById(R.id.et_owner);
        mVinET = activity.findViewById(R.id.et_vin);
        mOwnerPromptIV = activity.findViewById(R.id.iv_owner_prompt);
        mVinIV = activity.findViewById(R.id.iv_vin_prompt);
        mOwnerTV = activity.findViewById(R.id.tv_owner);
        mVinTV = activity.findViewById(R.id.tv_vin);
        mNextTV = activity.findViewById(R.id.tv_next);
        mOwnerLineV = activity.findViewById(R.id.v_owner_line);
        mVinLineV = activity.findViewById(R.id.v_vin_line);

        mNextTV.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Intent intent = Router.fromPath(AccountActivityConst.Path.COMPANY_AUTH_OWNER);
                ActivityUtils.startActivity(activity, intent);
            }
        });
    }
}
